package com.minosiants.dann.data


class OauthData extends BasicData{
	var requestToken=""
	var requestSecret=""
	var accessToken=""
	var accessSecret=""	
	var verifier=""
	var userId=""
	var serviceProvider=""	
	val collectionName=OauthData.collectionName
}
object OauthData {
	val collectionName="oauthData"
	def merge(s:OauthData,u:OauthData):OauthData={
		object result extends OauthData{
			this.requestToken=if (u.requestToken!="") u.requestToken else s.requestToken
			this.requestSecret=if (u.requestSecret!="") u.requestSecret else s.requestSecret
			this.accessToken=if (u.accessToken!="") u.accessToken else s.accessToken
			this.accessSecret=if (u.accessSecret!="") u.accessSecret else s.accessSecret
			this.verifier=if (u.verifier!="") u.verifier else s.verifier
			this.userId=if (u.userId!="") u.userId else s.userId
			this.serviceProvider=if (u.serviceProvider!="") u.serviceProvider else s.serviceProvider
		}
		result
	}	
}